{% extends "base.html" %}
{% load url from future %}
{% load humanize %}
{% load i18n %}

{% block content %}

    <table>
        <tr>
            <th>Report</th>
            <th>Coordinates</th>
            <th>Player</th>
            <th>Date</th>
        </tr>
        {% for report in reports %}
            <tr>
                <td>
                    #<a href="{% url 'show_report' report.id %}">{{ report.id }}</a>
                </td>
                <td>
                    <a href="{% url 'show_planet' report.planet.id %}">
                        {{ report.planet.galaxy }}:{{ report.planet.ss|escape }}:{{ report.planet.position }}
                    </a></td>
                </td>
                <td>
                    <a href="{% url 'show_player' report.planet.player.id %}">{{ report.planet.player }}</a>
                </td>
                <td>
                    {{ report.report_date|naturaltime }}
                </td>
            </tr>
        {% endfor %}
    </table>


    <div class="pagination">
        <span class="step-links">
            {% if reports.has_previous %}
                <a href="?page={{ reports.previous_page_number }}"><img class="r270 middle" src="{{ STATIC_URL }}/up.png" /></a>
            {% endif %}

            <span class="current">
                {% trans 'Page' %} <strong>{{ reports.number }}</strong> {% trans 'of' %} <strong>{{ reports.paginator.num_pages }}</strong>.
            </span>

            {% if reports.has_next %}
                <a href="?page={{ reports.next_page_number }}"><img class="r90 middle" src="{{ STATIC_URL }}/up.png" /></a>
            {% endif %}
        </span>
    </div>

{% endblock %}
